<template>
  <div>
    <div class="moment">{{ nowdate }}</div>
    <div v-for="(item, index) in items" :key="index" class="moment">
      {{ item }}
    </div>
  </div>
</template>

<script>
import moment from "moment";
export default {
  name: "moment",
  data() {
    return {
      nowdate: "",
      items: []
    };
  },
  mounted() {
    this.nowdate = moment().format("YYYY年MM月DD日");
    this.items[0] = moment().format("MMMM Do YYYY, h:mm:ss a");
    this.items[1] = moment().format("dddd");
    this.items[2] = moment().format("YYYY [escaped] YYYY");
    this.items[3] = moment().startOf("day");
  }
};
</script>

<style lang="scss" scoped>
.moment {
  margin-bottom: 5px;
}
</style>
